<h1>Listing professors</h1>

<table>
  <tr>
    <th>Id</th>
    <th>First name</th>
    <th>Last name</th>
    <th>Department</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @professors.each do |professor| %>
  <tr>
    <td><%= professor.id %></td>
    <td><%= professor.first_name %></td>
    <td><%= professor.last_name %></td>
    <td><%= professor.department %></td>
    <td><%= link_to 'Show', professor %></td>
    <td><%= link_to 'Edit', edit_professor_path(professor) %></td>
    <td><%= link_to 'Destroy', professor, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Professor', new_professor_path %>
